# encoding: utf-8

import os

def main(env):
	string = env["context"]["selection"]
	string = ", ".join(item.strip() for item in string.split(","))
	string = string.replace("'",u"’").encode("utf8")
	os.system("echo '%s' | osascript ../cwmenu/menu.scpt" % string)
	return [("replace","")]
